package cn.yeziji.forum.factory.websocket.enums;

import cn.yeziji.forum.factory.websocket.WebsocketOperationExecutioner;
import cn.yeziji.forum.factory.websocket.parts.ChatroomPart;
import cn.yeziji.forum.factory.websocket.parts.SystemMsgPart;
import cn.yeziji.forum.factory.websocket.parts.UserChatMsgPart;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * websocket 操作选项
 *
 * @author gzkemays
 * @since 2022/3/27 14:22
 * @deprecated to netty
 */
@Getter
@AllArgsConstructor
public enum WebsocketFactoryOption {
  /** 指定操作对象 */
  CHAT_ROOM_SEND(ChatroomPart.class, WebsocketOperationExecutioner.DEFAULT_METHOD),
  GET_USER_MSG(UserChatMsgPart.class, WebsocketOperationExecutioner.DEFAULT_METHOD),
  SYSTEM_PUSH_MSG(SystemMsgPart.class, WebsocketOperationExecutioner.DEFAULT_METHOD),
  GET_USER_RECORDS(UserChatMsgPart.class, "userRecords"),
  CHAT_ROOM_EXPIRED(ChatroomPart.class, "redisExpiredHandler"),
  CHAT_ROOM_CLOSE(ChatroomPart.class, "close"),
  CHAT_ROOM_ALL(ChatroomPart.class, "publishChat"),
  CHAT_ROOM_ALL_CLOSE(ChatroomPart.class, "publishClose"),
  CHAT_ROOM_RECORDS(ChatroomPart.class, "records");
  Class<?> clazz;
  String method;
}
